function [GAM0,GAM1,PSI,PPI] = gammas_ShockSpecific_R(paramSS)

phiM=paramSS(1);      % Taylor rule response to inflation Monetary Dominance
gammM=paramSS(2);     % Debt response with surplus Monetary Dominance  
rho_tau=paramSS(3);   % Persistence of transfer shock
rstar=paramSS(4);     % Inverse of discount factor
sigt=paramSS(5);      % standard deviation transfer shock
phiF=paramSS(6);      % Taylor rule response to inflation Fiscal Dominance
gammF=paramSS(7);     % Debt response with surplus Fiscal Dominance


ii=0;
vi=ii+1;ii=ii+1;        % nominal interest rate (r_n in the paper)
vpi=ii+1;ii=ii+1;       % inflation rate
vb=ii+1;ii=ii+1;        % real market value of debt to output (s_b in the paper)
vtau=ii+1;ii=ii+1;      % primary surplus
% Parallel Economy's Variables  (shadow economy with unfunded transfers)
viF=ii+1;ii=ii+1;       % nominal interest rate (r_n in the paper) shadow economy
vpiF=ii+1;ii=ii+1;      % inflation rate Shadow economy
vbF=ii+1;ii=ii+1;       % real market value of debt to output (S_b in the paper) shadow economy
vtauF=ii+1;ii=ii+1;     % primary surplus shadow economy
%Exogenous Processes
vMt=ii+1;ii=ii+1;       % shock to funded transfers
vFt=ii+1;ii=ii+1;       % shock to unfunded transfers
%Expectation variables
jj=0;
vEpi=ii+1;ii=ii+1;jj=jj+1;   % Expected inflation
vEpiF=ii+1;ii=ii+1;jj=jj+1;  % Ecpected inflation shadow economy
neq=ii;
nend=jj;


%Exog shocks
is=0;
eMt=is+1;is=is+1; %Fiscal funded innovations
eFt=is+1;is=is+1; %Fiscal unfunded innovations
nex=is;

GAM0 = zeros(neq,neq);
GAM1 = zeros(neq,neq);
PSI  = zeros(neq,nex);
PPI  = zeros(neq,nend);


%% Fisher Equation
eq=1;
GAM0(eq,vi)=1;
GAM0(eq,vEpi)=-1;

%% Monetary Rule
eq=eq+1;
GAM0(eq,vi)=1;
GAM0(eq,vpi)=-phiM;
GAM0(eq,vpiF)=phiM-phiF;

%% Govt Budget Constraint
eq=eq+1;
GAM0(eq,vtau)=rstar*(1-1/rstar);
GAM0(eq,vb)=1;
GAM1(eq,vi)=rstar;
GAM1(eq,vb)=rstar;
GAM0(eq,vpi)=rstar;

%% Fiscal Rule
eq=eq+1;
GAM0(eq,vtau)=1;
GAM1(eq,vb)=gammM;
GAM1(eq,vbF)=-gammM+gammF;
GAM0(eq,vMt)=-1;
GAM0(eq,vFt)=-1;


%% Parallel Economy
%% Fisher Equation
eq=eq+1;
GAM0(eq,viF)=1;
GAM0(eq,vEpiF)=-1;

%% Monetary Rule
eq=eq+1;
GAM0(eq,viF)=1;
GAM0(eq,vpiF)=-phiF;

%% Govt Budget Constraint
eq=eq+1;
GAM0(eq,vtauF)=rstar*(1-1/rstar);
GAM0(eq,vbF)=1;
GAM1(eq,viF)=rstar;
GAM1(eq,vbF)=rstar;
GAM0(eq,vpiF)=rstar;


%% Fiscal Rule
eq=eq+1;
GAM0(eq,vtauF)=1;
GAM1(eq,vbF)=gammF;
GAM0(eq,vFt)=-1;

%% Exogenous Processes

% Primary surplus shocks (Funded)
eq=eq+1;
GAM0(eq,vMt)=1;
GAM1(eq,vMt)=rho_tau;
PSI(eq,eMt)=sigt;

% Primary surplus shocks (Unfunded)
eq=eq+1;
GAM0(eq,vFt)=1;
GAM1(eq,vFt)=rho_tau;
PSI(eq,eFt)=sigt;

%-----------------------
% EXP ERROR output
eq=eq+1;
GAM0(eq,vpi)    = 1;
GAM1(eq,vEpi)   = 1;
PPI(eq,1) = 1;

% EXP ERROR output
eq=eq+1;
GAM0(eq,vpiF)    = 1;
GAM1(eq,vEpiF)   = 1;
PPI(eq,2) = 1;


